package com.virtual.repository.common.queries;

import java.util.HashMap;
import java.util.Map;

/**This class represents results of inner queries executed by database plugins.
 * @author Kuba
 *
 */
public class ResultEntity {

	private Map<String, Object> entityFields = new HashMap<>();
	
	/**Gets value of field by given name. 
	 * @param name - Name of field
	 * @return Value of field "name"
	 */
	public Object getField(String name ) {
		return entityFields.get(name);
	}
	
	/**Sets value of field "name"
	 * @param name - field name
	 * @param value - Value to set
	 */
	public void setField (String name, Object value) {
		entityFields.put(name, value);
	}

	public Map<String, Object> getEntityFields() {
		return entityFields;
	}
	
	public void setEntityFields(Map<String, Object> entityFields) {
		this.entityFields = entityFields;
	}
	
	@Override
	public String toString() {
		return "ResultEntity [entityFields=" + entityFields + "]";
	}
}
